<?php

require ('Stencil.php');
require_once( 'util.php' );
if (!is_logged())
{
	report_err_and_exit( '请先登录' );
}

require ('dbconnect.php');
output_frame_header ( '密码修改' );

$userName = $_SESSION ['userName'];
$u_id = $_SESSION ['u_id'];
$gender = $_SESSION ['gender'];
$group = $_SESSION ['group'];
$phone = $_SESSION ['phone'];
$address = $_SESSION ['address'];
$birthday = $_SESSION ['birthday'];
$occupation = $_SESSION ['occupation'];
$blood_type = $_SESSION ['blood_type'];
$weibo = $_SESSION ['weibo'];
$qq = $_SESSION ['qq'];
$u_image = $_SESSION ['u_image'];
$s_question = $_SESSION ['s_question'];
$s_answer = $_SESSION ['s_answer'];
$mail = $_SESSION ['mail'];

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- 连接网页模版css设计文件 -->
<link rel="stylesheet" href="style/Stencil.css" />
<script src="jquery-1.4.4.min.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="style/validator.css"></link>
<script src="formValidator-4.0.1.js" type="text/javascript"
	charset="UTF-8"></script>
<script src="formValidatorRegex.js" type="text/javascript"
	charset="UTF-8"></script>
<script type="text/javascript">
$(document).ready(function() {
		$.formValidator.initConfig({
			formID : "psw_check_form",
			onError : function() {
				alert("校验没有通过，具体错误请看错误提示")
			}
		});
		$("#new_password").formValidator({
			onShow : "请输入新密码",
			onFocus:"密码至少5个字符,最多10个字符",
			onCorrect : "密码合法"
		}).inputValidator({
			min : 5,max:10,
			empty : {
				leftEmpty : false,
				rightEmpty : false,
				emptyError : "密码两边不能有空符号"
			},
			onError : "密码至少5个字符,最多10个字符"
		});
		$("#c_new_password").formValidator({
			onShow : "输再次输入密码",
			onFocus:"密码至少5个字符,最多10个字符",
			onCorrect : "密码一致"
		}).inputValidator({
			min : 1,max: 10,
			empty : {
				leftEmpty : false,
				rightEmpty : false,
				emptyError : "重复密码两边不能有空符号"
			},
			onError : "重复密码密码至少5个字符,最多10个字符"
		}).compareValidator({
			desID : "new_password",
			operateor : "=",
			onError : "2次密码不一致,请确认"
		});
		$("#birthday").formValidator({
			onShow : "请输入的出生日期",
			onFocus : "请输入的出生日期",
			onCorrect : "你输入的日期合法"
		}).inputValidator({
			min : "1900-01-01",
			max : "2010-12-31",
			type : "date",
			onError : "在\"1900-01-01\"和\"2010-12-31\"之间"
		}).defaultPassed();
		$("#email").formValidator({
			onShow : "请输入你的email",
			onfocus : "请输入你的email",
			onCorrect : "你的email正确"
		}).regexValidator({
			regExp : "email",
			dataType : "enum",
			onError : "email格式不正确"
		});
	});
</script>
<title>网页模版</title>
</head>
<body>


	<!-- 空格 -->
	<!-- 内容部分 -->
	<!-- 在此书写内容设计 -->

	<div id="wp" class="wp ">
		<!-- 在此书写内容设计 -->
		<table>
			<tbody>
				<tr>
					<!-- 左边菜单栏 -->
					<td background="images/option.jpg">
						<?php require_once( 'settings.inc.php' ); ?>
					</td>
					<!-- 右边修改 -->
					<td>
						<table>
							<form action="password_check.php" method="post"
								name="psw_check_form" id="psw_check_form">
								<tr>
									<td width="100" height="35" align="right">请输入原密码</td>
									<td width="10"></td>
									<td width="268"><input type="password" name="original_password"
										id="original_password" style="width: 250px;"></td>
									<td><div id="original_passwordTip" style="width: 200px"></div></td>
								</tr>
								<tr>
									<td width="100" height="35" align="right">请输入新密码</td>
									<td width="10"></td>
									<td width="268"><input type="password" id="new_password"
										name="new_password" style="width: 250px;"></td>
									<td><div id="new_passwordTip" style="width: 200px"></div></td>
								</tr>
								<tr>
									<td width="100" height="35" align="right">确认新密码</td>
									<td width="10"></td>
									<td width="268"><input type="password" id="c_new_password" name="c_new_password"
										style="width: 250px;"></td>
									<td><div id="c_new_passwordTip" style="width: 200px"></div></td>
								</tr>
								<tr>
									<td width="100" height="35" align="right"></td>
									<td width="10"></td>
									<td><input type="image" src="images/submit.jpg" width="60"
										height="25" name="submit" id="submit" value="提交"></td>
								</tr>
							</form>
						</table>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="space"></div>
</body>
</html>


<?php output_frame_footer();?>